import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "../src/store";
//1.引入mock的配置，让mock运行起来
import "@/mock";

import components from "./main/components";
import element from "./main/element";
import lazyload from "./main/lazyload";
import validate from "@/main/validate";

// 1.全局注册组件
Vue.use(components);
//2.使用elementUI插件
Vue.use(element);
//3.使用懒加载插件
Vue.use(lazyload);
// 4.使用校验插件
Vue.use(validate);

Vue.config.productionTip = false;

new Vue({
	render: (h) => h(App),
	router,
	store,
	beforeCreate() {
		Vue.prototype.$bus = this;
	},
}).$mount("#app");
